﻿{% extends "front/base.html" %}
{% from "common/_macro.html" import static %}

{% block head %}
    <link rel="stylesheet" href="{{ static("front/css/tags_detail.css") }}">
{% endblock %}

{% block body %}
    <div class="main_contener">
        <div class="col-md-8">
 <div class="tag-title">
                {{ tagname }}
            </div>
            <div id="demo">
                {% for post in posts %}
                <div class="item-content">
                    <ul>
                        <li>
                        {% if post.content|avatar_img!='' %}
                            <div class="img-group">
                                <img src="{{ post.content|avatar_img }}">
                            </div>
                        {% endif %}
                            <div class="content">
                                <span class="title"><a href="{{ url_for("front.post_detail",post_id=post.id)}}">{{ post.title }}</a></span>
                                <div class="author-group">
                                    <img src="{{ post.author.avatar }}"
                                         alt="">
                                    <a href="">
                                        {{ post.author.nickname }}
                                    </a>
                                    <i class="clock icon"></i>
                                    {{ post.create_time }}
                                    阅读数量：{{ post.read_count}}
                                </div>
                                <div class="text">
                                    {#                                        {{ post.content|striptags|truncate(160) }}#}
                                    {{ post.content|striptags|truncate(160) }}
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                {% endfor %}
            </div>

        </div>

        <div class="col-md-4">

        </div>
    </div>
{% endblock %}